// 类型注解
let data:number = 3

interface Student {
    name:string,
    age:number
}

// let stuObj:Student = 3




// 类型推导
let money = 30 // 推导成number
let money1 = '20' // 推导成string
// money1 =20 报错

export class Teacher {
    name!:string
    constructor(name: string){
        this.name = name
    }
    teaching(){}
}

// 类型注解 和 类型推导的区别： 前者定义时就固化，后者定义时的值由它来推导
export {

}